package com.maxjay.component.simplelist.service;

import java.util.List;
import java.util.Map;

import com.maxjay.component.metadata.model.Record;
import com.maxjay.component.simplelist.model.QueryScheme;

public interface QuerySchemeService {
	
	/**
	 * 获取查询方案的结果数量，用于分页显示
	 * 
	 * @param schemeId
	 * @param queryParams
	 * @return
	 */
	int getRecordCount(QueryScheme queryScheme, Map<String, Object> queryParams);
	
	/**
	 * 获取所有符合条件的记录
	 * 
	 * @param schemeId
	 * @param queryParams
	 * @return
	 */
	List<Record> getRecordList(QueryScheme queryScheme, Map<String, Object> queryParams);

	/**
	 * 分页获取符合条件的记录
	 * 
	 * @param schemeId
	 * @param queryParams
	 * @param startRow
	 * @param endRow
	 * @return
	 */
	List<Record> getRecordList(QueryScheme queryScheme, Map<String, Object> queryParams, int startRow, int endRow);	
	
	/**
	 * 获取所有符合条件的记录
	 * 
	 * @param schemeId
	 * @param queryParams
	 * @return
	 */
	List<Record> getDisplayRecordList(QueryScheme queryScheme, Map<String, Object> queryParams);
	
	/**
	 * 获取所有符合条件的记录
	 * 
	 * @param schemeId
	 * @param queryParams
	 * @return
	 */
	List<Record> getDisplayRecordList(QueryScheme queryScheme, Map<String, Object> queryParams, int startRow, int endRow);
	
	List<Map<String, Object>> getRecordMapList(QueryScheme queryScheme, Map<String, Object> queryParams, int startRow, int endRow);
	
}
